<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="format-detection" content="telephone=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<title>我房旅居</title>
		<link rel="stylesheet" type="text/css" href="css/reset.css" />
		<link rel="stylesheet" type="text/css" href="css/footer.css" />
		<link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
		<link href="css/photoswipe.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/wap.js"></script>
		<script type="text/javascript" src="js/klass.min.js"></script>
		<script type="text/javascript" src="js/code.photoswipe-3.0.5.min.js"></script>
		<script type="text/javascript" src="js/iscroll.js"></script>

	</head>

	<body>
		<header>
			<a href="javascript:history.go(-1);" class="back"><img src="images/icon/back.png"></a>
			<h1>天悦湖畔</h1>
		</header>
		<div class="gallery">
			<div id="imgdetail" class="f14 row" align="center">
				<p></p>
				<span></span>
			</div>
			<ul id="Gallery" class="gallery">
				<php>$curnumber = 0;$curType=0;$type_cnt=0;</php>
				<volist name="imglist" id="vo">
					<php>if($key==$_GET['imgid']){ $curnumber=$i-1; } if($curType==$vo['type']){ $type_cnt ++; }else{ $curType=$vo['type']; $type_cnt=1; }
					</php>
					<li id="img_<php>echo $i-1;</php>">
						<a href="{:getImgPath($vo['path'])}?{$vo['updatedAt']}" alt="{$vo.name}" data-num="{$type_cnt}/{$imgTypel[$vo['type']]['typecount']}"></a>
					</li>
				</volist>
			</ul>
			<div id="album_foot">
				<div class="albnav rbox6 f16" style="white-space:nowarp;">
					<div style="overflow: hidden;" id="wrapper">
						<div style="-webkit-transition: -webkit-transform 0ms; transition: -webkit-transform 0ms; -webkit-transform-origin: 0px 0px; -webkit-transform: translate3d(0px, 0px, 0);" id="scroller" size="{$typecount}">

							<php>$last_count = 0;</php>
							<volist name="imgTypel" id="vo">
								<a href="javascript:void(0)" class="awhite" id="item_<php>echo $i-1;</php>" num="{$last_count}_<php>echo $last_count + $vo['typecount'];</php>">{$typeArr[$vo['type']]}({$vo.typecount})</a>
								<php>$last_count += $vo['typecount'];</php>
							</volist>
						</div>
						<div class="clear"></div>
					</div>
				</div>
				<script type="text/javascript">
					var instance;
					var curnumber = {
						$curnumber
					};
					document.addEventListener('DOMContentLoaded', function() {
						var bua = navigator.userAgent.toLowerCase();
						if (bua.indexOf('iphone') >= 0 || bua.indexOf('ipod') >= 0) {
							$('body').css("height", window.innerHeight + 100);
							window.scrollTo(0, 1);
							$("body").css("height", window.innerHeight);
						}
						var myPhotoSwipe = Code.PhotoSwipe.attach(window.document.querySelectorAll('#Gallery a'), {
							allowUserZoom: true,
							preventHide: true,
							captionAndToolbarHide: true,
							loop: false
						});
						myPhotoSwipe.show(curnumber);
						for (var i = 0; i < 7; i++) {
							$('#item_' + i).click(function() {
								var ing_num = $(this).attr('num').split("_");
								var shownum = parseInt(ing_num[0]);
								myPhotoSwipe.slideCarousel(shownum);
								$('#curnumber').html(shownum + 1);
								$('#imgdetail').find('p').html($('#img_' + shownum + ' a').attr('alt'));
								$('#imgdetail').find('span').html($('#img_' + shownum + ' a').attr('data-num'));
								for (var j = 0; j < 7; j++) {
									$('#item_' + j).attr('class', 'awhite');
								}
								$(this).attr('class', 'ablue');
							})
						};
						fcenter();
					}, false);

					function loaded() {
						myScroll = new iScroll('wrapper', {
							zoom: true,
							hScrollbar: false,
							vScrollbar: false
						});
					}
					document.addEventListener('touchmove', function(e) {
						e.preventDefault();
					}, false);
					document.addEventListener('DOMContentLoaded', loaded, false);
					var n = 0;
					var hide_other = 0;
					var flag = 0;
					document.addEventListener('touchstart', function(ev) {
						flag = 0;
					});
					document.addEventListener('touchmove', function(ev) {
						flag = 1;
					});
					document.addEventListener('touchend', function(ev) {
						if (ev.target.getAttribute("class") == "ps-uilayer" && flag == 0) {
							n++;
							var timer = setTimeout("callBack();", 300);
							if (n == 2) {
								clearTimeout(timer);
							}
						}
					});
				</script>
			</div>

			<a href="javascript:void(0)">实景图(67)</a>

	</body>

</html>